package com.macro.mall.model_jpa;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.springframework.data.annotation.CreatedDate;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

@Data
@Entity
@Table(name="oms_order_return_apply")
@DynamicInsert
public class OmsOrderReturnApply implements Serializable {

    private static final long serialVersionUID = 1L;

    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Id
    @Column(name = "id")
    private Long id;

    @ApiModelProperty(value = "订单id")
    @Column(name = "order_id")
    private Long orderId;

    @ApiModelProperty(value = "收货地址表id")
    @Column(name = "company_address_id")
    private Long companyAddressId;

    @ApiModelProperty(value = "退货商品id")
    @Column(name = "product_id")
    private Long productId;

    @ApiModelProperty(value = "订单编号")
    @Column(name = "order_sn")
    private String orderSn;

    @ApiModelProperty(value = "申请时间")
    @Column(name = "create_time")
    @CreatedDate
    private Date createTime;

    @ApiModelProperty(value = "会员用户名")
    @Column(name = "member_username")
    private String memberUsername;

    @ApiModelProperty(value = "退款金额")
    @Column(name = "return_amount")
    private BigDecimal returnAmount;

    @ApiModelProperty(value = "退货人姓名")
    @Column(name = "return_name")
    private String returnName;

    @ApiModelProperty(value = "退货人电话")
    @Column(name = "return_phone")
    private String returnPhone;

    @ApiModelProperty(value = "申请状态：0->待处理；1->退货中；2->已完成；3->已拒绝")
    @Column(name = "status")
    private Integer status;

    @ApiModelProperty(value = "处理时间")
    @Column(name = "handle_time")
    private Date handleTime;

    @ApiModelProperty(value = "商品图片")
    @Column(name = "product_pic")
    private String productPic;

    @ApiModelProperty(value = "商品名称")
    @Column(name = "product_name")
    private String productName;

    @ApiModelProperty(value = "商品品牌")
    @Column(name = "product_brand")
    private String productBrand;

    @ApiModelProperty(value = "商品销售属性：颜色：红色；尺码：xl;")
    @Column(name = "product_attr")
    private String productAttr;

    @ApiModelProperty(value = "退货数量")
    @Column(name = "product_count")
    private Integer productCount;

    @ApiModelProperty(value = "商品单价")
    @Column(name = "product_price")
    private BigDecimal productPrice;

    @ApiModelProperty(value = "商品实际支付单价")
    @Column(name = "product_real_price")
    private BigDecimal productRealPrice;

    @ApiModelProperty(value = "原因")
    @Column(name = "reason")
    private String reason;

    @ApiModelProperty(value = "描述")
    @Column(name = "description")
    private String description;

    @ApiModelProperty(value = "凭证图片，以逗号隔开")
    @Column(name = "proof_pics")
    private String proofPics;

    @ApiModelProperty(value = "处理备注")
    @Column(name = "handle_note")
    private String handleNote;

    @ApiModelProperty(value = "处理人员")
    @Column(name = "handle_man")
    private String handleMan;

    @ApiModelProperty(value = "收货人")
    @Column(name = "receive_man")
    private String receiveMan;

    @ApiModelProperty(value = "收货时间")
    @Column(name = "receive_time")
    private Date receiveTime;

    @ApiModelProperty(value = "收货备注")
    @Column(name = "receive_note")
    private String receiveNote;
}